package com.imooc.girl.repository;



import com.imooc.girl.domain.StuGrade;
        import com.imooc.girl.domain.GetStuGrade;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
        import org.springframework.data.jpa.repository.JpaRepository;
        import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
        import org.springframework.data.jpa.repository.Query;

import java.util.HashSet;
import java.util.List;
import java.util.Set;


public interface GradeInfoRepositry extends JpaRepository<StuGrade,String>,JpaSpecificationExecutor<StuGrade> {
    @Query(value = "select s from StuGrade s join s.stuInfo t where s.yearTerm=?1 and t.stuClass=?2 and t.major=?3 and s.allGrade between ?4 and ?5")
    Page<GetStuGrade> findStuGradeByStuId(String yearterm, String stuClass, String major, float scoreLower, float scoreUpper, Pageable pageable);

}
